home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
doors_2
/
preg120.zip
/
SOURCE.ZIP
/
P-REG.PAS
Wrap
Pascal/Delphi Source File
|
1992-05-19
|
10KB
|
344 lines
(*
** Registration door for Remote Access
**
** (c) 1991-1992 Hans Siemons
**
** Last revision : May 19, 1992
*)
(*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*)
Uses
RADU;
(*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*)
Const Regels=19;
(*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*)
type AntType=Array[1..regels] of String[42];
Antwoorden=Record
Name:String[35];
Ants:AntType;
end;
(*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*-+-*)
Const CtlFile:Array[1..8] of String[80]=(
'Velden 1 t/m 6 moeten ingevuld worden! Druk op [Enter] om verder te gaan.',
'Escape=klaar',
'Prime BBS users registration door',
'Moment, wegschrijven van data!',
'Voorbeeld:',
'50',
'B3',
'A1A2A3A4A5A6A7A8');
Var
EntryCount : Byte;
Entrys : AntType;
Legals : Array[1..regels] of CharSet;
Lens : Array[1..regels] of Byte;
Voorbeeld : Array[1..regels] of string[80];
Antw : Array[1..regels] Of string[80];
AFile : File of Antwoorden;
ARec : Antwoorden;
Key : Char;
f : text;
s : String;
i : Integer;
ok : Boolean;
NewOne : Boolean;
RecNr : Integer;
txtPath : String;
Begin
DorInit;
DorAvatar:=False; {Kill AVT and set ANSI on}
DorAnsi:=True;
DorStatLn[8,1]:='Gebruikers Registratie Door v1.20';
DorStatLn[8,2]:='Door Hans Siemons.';
DorFrozen:=true;
DorExtKeys[132]:=DorExtKeys[72]; { Move up-arrow to ^PgUp }
DorExtKeys[118]:=DorExtKeys[80]; { Move down-arrow to ^PgDn }
DorExtKeys[72]:=DorNullProc; { Clear up-arrow }
DorExtKeys[80]:=DorNullProc; { Clear down-arrow }
DorStatLn[9,1]:='ALT: [C]hat [G]arbage [H]angup [L]ockOut [N]extOn [O]verride [Q]uit to BBS';
DorStatLn[9,2]:=' [S]ecurity [^PgUp]-Inc Time [^PgDn]-Dec Time [F1]-[F8]=Extra Stats';
Key:=DorDisplay ('reg-new.ans','',false);
DorCleanKeys;
Key:=Readkey;
DorCleanKeys;
ClrScr;
NewOne:=true;
s:=ForceBack(RaConfig.MsgBasePath)+'USERSINF.BBS';
FileMode:=$40;
Assign (AFile,s);
{$I-}
Reset(AFile);
{$I+}
if ioresult=0 then
begin
While not eof(AFile) do
begin
Read(AFile,ARec);
if ARec.Name=ExitInfo.UserInfo.Name then begin
for i:=1 to regels do Entrys[i]:=ARec.Ants[i];
NewOne:=false;
RecNr:=Filepos(AFile)-1;
end;
end;
end
else
begin
ReWrite(AFile);
end;
Close(AFile);
if NewOne then
begin
for i:=1 to regels do Entrys[i]:='';
Entrys[1]:=ExitInfo.UserInfo.Name;
Entrys[4]:=ExitInfo.UserInfo.Location;
Entrys[5]:=ExitInfo.UserInfo.VoicePhone;
Entrys[6]:=ExitInfo.UserXiInfo.Birthdate;
end;
Legals[1]:=[#32..#255]; { Setup legal characters }
Legals[2]:=Legals[1];
Legals[3]:=['0'..'9',' ','-','a'..'z','A'..'Z'];
Legals[4]:=Legals[1];
Legals[5]:=Legals[1];
Legals[6]:=['0'..'9','-','+'];
Legals[7]:=Legals[1];
Legals[8]:=Legals[1];
Legals[9]:=Legals[1];
Legals[10]:=Legals[1];
Legals[11]:=Legals[1];
Legals[12]:=Legals[1];
Legals[13]:=Legals[1];
Legals[14]:=Legals[1];
Legals[15]:=Legals[1];
Legals[16]:=Legals[1];
Legals[17]:=Legals[1];
Legals[18]:=Legals[1];
Legals[19]:=Legals[1];
Voorbeeld[1]:='Hans Siemons';
Voorbeeld[2]:='Prime weg 15 (GEEN!!! Postbusnummers)';
Voorbeeld[3]:='4815 AD';
Voorbeeld[4]:='Breda';
Voorbeeld[5]:='076-715391';
Voorbeeld[6]:='11-26-1969 (MM/DD/YY)';
Voorbeeld[7]:='Innovator 286, 12mhz, 100mb';
Voorbeeld[8]:='USRobotics Courier HST Dual Standard';
Voorbeeld[9]:='Telix, Frontdoor, Telemate.';
Voorbeeld[10]:='Palingboer, Fietsenmaker, Systeembeheerder';
Voorbeeld[11]:='';
Voorbeeld[12]:='PCM / BBSLijst / Nodelist / Ander BBS (welk bbs)';
Voorbeeld[13]:='Een BBS om donateur te worden hihi';
Voorbeeld[14]:='Ziet er hier wel prachtig uit hoor ;-)';
Voorbeeld[15]:='';
Voorbeeld[16]:='Ja of nee';
Voorbeeld[17]:='Prime BBS';
Voorbeeld[18]:='076-715391 24 uur';
Voorbeeld[19]:='2:512/149 9:77/1000 2:512/149.1';
TxtPath:=ForceBack(Language.TextPath);
filemode:=$40;
Assign(f,TxtPath+'p-reg.vb');
{$I-}
Reset(f);
{$I+}
if ioresult=0 then
begin
For I:=1 to 19 do if not eof(f) then readln(f,Voorbeeld[i]);
Close(f);
end;
Antw[01]:='Naam';
Antw[02]:='Adres';
Antw[03]:='Postcode';
Antw[04]:='Plaats';
Antw[05]:='Telefoonnummer';
Antw[06]:='Geboorte datum';
Antw[07]:='Soort/Merk computer';
Antw[08]:='Soort/Merk Modem';
Antw[09]:='Wat is je terminalprogramma';
Antw[10]:='Beroep, hobby''s? :';
Antw[11]:='';
Antw[12]:='Waar heb je dit nummer vandaan';
Antw[13]:='Wat hoop je hier te vinden';
Antw[14]:='Eventuele opmerkingen?';
Antw[15]:='';
Antw[16]:='Ben je zelf ook sysop?';
Antw[17]:='Zo ja, wat de naam van je bbs';
Antw[18]:='Tel. nr bbs en Online tijden';
Antw[19]:='Nodenummer (ook voor points)';
filemode:=$40;
Assign(f,TxtPath+'p-reg.vr');
{$I-}
Reset(f);
{$I+}
if ioresult=0 then
begin
For I:=1 to 19 do if not eof(f) then readln(f,Antw[i]);
Close(f);
end;
For i:=1 to 19 do
begin
Antw[i]:=RightJust(Antw[i],30)+' :';
end;
Lens[1]:=42; { Setup string lengths }
Lens[2]:=42;
Lens[3]:=7;
Lens[4]:=42;
Lens[5]:=42;
Lens[6]:=8;
Lens[7]:=42;
Lens[8]:=42;
Lens[9]:=42;
Lens[10]:=42;
Lens[11]:=0;
Lens[12]:=42;
Lens[13]:=42;
Lens[14]:=42;
Lens[15]:=0;
Lens[16]:=3;
Lens[17]:=42;
Lens[18]:=42;
Lens[19]:=42;
filemode:=$40;
Assign(f,txtPath+'p-reg.ctl');
{$I-}
Reset(f);
{$I+}
if ioresult=0 then
begin
For I:=1 to 8 do if not eof(f) then readln(f,CtlFile[i]);
Close(f);
end;
Write ('`A112:`G2,1: ',CtlFile[3],RightJust('(c) 1992 Hans Siemons ',77-length(CtlFile[3])));
Write ('`A15:`G2,2:'+dup ('▀',78)+'`G2,22:'+dup ('═',78));
For I:=1 to regels do if i<>11 then
begin
GotoXY (3,2+i);
write ('`A7:'+Antw[i]+' `A112:'+dup('░',lens[i]));
end;
GotoXY(78-Length(CtlFile[2]),23);Write ('`A15:[`A143:',CtlFile[2],'`A15:]');
TextColor(0);
TextBackGround(7);
For EntryCount:=1 to regels do
Begin
GotoXY (36,EntryCount+2);
Write (Entrys[EntryCount]);
End; { For }
EntryCount:=1;
repeat
Repeat
Write ('`A15:`G2,23:',CtlFile[5],' '+LeftJust(voorbeeld[EntryCount],75-length(CtlFile[2])-Length(CtlFile[5])));
TextColor(0);
TextBackGround(7);
GotoXY (36,EntryCount+2);
s:=Entrys[EntryCount];
Key:=DorLineEdit(s,Lens[EntryCount],Legals[EntryCount],[#1,#2,#13,#27],'░');
Entrys[EntryCount]:=s;
Case Key of
#1 : Begin { Up-Arrow pressed }
If EntryCount>1 then
Dec(EntryCount);
if Lens[entryCount]=0 then Dec(EntryCount);
End; { UpArrow }
#2 : Begin { Down-Arrow pressed }
If EntryCount<regels then
Inc(EntryCount);
if Lens[entryCount]=0 then Inc(EntryCount);
End; { DownArrow }
#13 : Begin { Enter pressed }
If Entrycount=16 then
begin
If (SupCase(Entrys[16])='NO') or
(SupCase(Entrys[16])='N') or
(Entrys[16]='') or
(SupCase(Entrys[16])='NEE') then Key:=#27;
end;
Inc (EntryCount);
If EntryCount=Regels+1 then
Begin
EntryCount:=1;
Key:=#27;
end;
If Lens[entryCount]=0 then Inc(EntryCount);
End; { Enter }
End; { Case }
Until Key=#27;
ok:=true;
for i:=1 to 6 do if (Entrys[i]='') and (lens[i]<>0) then Ok:=false;
if not ok then begin
GotoXY (1,23);
TextBackGround(0);
ClrEol;
Write ('`C:`A15:`Y23:Velden 1 t/m 6 moeten ingevuld worden! Druk op [Enter] om verder te gaan.');
Key:=Readkey;
DorCleanKeys;
GotoXY(78-Length(CtlFile[2]),23);Write ('`A15:[`A143:',CtlFile[2],'`A15:]');
end;
Until Ok;
TextBackGround(0);
GotoXY(1,23);
ClrEol;
Write ('`C:`A142:',CtlFile[4]);
FileMode:=$11;
Assign(f,RaSystem+'NewUser.Asw');
{$I-}
Append(f);
{$I+}
if IOResult<>0 then ReWrite(f);
Writeln (f,'*** '+ExitInfo.UserInfo.Name+' completed questionnaire at '+
TimeStr(false,false)+' on '+RAFormatDate(DateStr,4)+' ***');
Writeln (f,'Baudrate used by user : '+FStr(ExitInfo.Baud));
for i:=1 to Regels do writeln (f,Antw[i]+Entrys[i]);
Writeln (f,'Answers Collected by UserRegDoor by Hans Siemons');
Writeln (f);
close(f);
FileMode:=$11;
Reset(AFile);
if newOne then
Seek(AFile,FileSize(AFile))
else
Seek(AFile,RecNR);
ARec.Name:=Exitinfo.UserInfo.Name;
ARec.Ants:=Entrys;
Write(AFile,ARec);
close(AFile);
If ExitInfo.UserInfo.Security <FVal(CtlFile[6]) then RaSetSecurity(FVal(CtlFile[6]));
RaResetFlags(ExitInfo.UserInfo.Flags,CtlFile[7]);
RaSetFlags(ExitInfo.UserInfo.Flags,CtlFile[8]);
ClrEol;
Key:=DorDisplay ('reg-end.ans','',false);
Key:=Readkey;
clrscr;
Writeln ('`A143:THANKS`A7: for using `F15:User Registration Door v1.20+');
Writeln ('`F7:(C)1991-1992 By Hans Siemons');
End.